package com.yyplatform.admin.platform.config.model.entity;


import com.yyplatform.admin.infra.model.entity.BaseEntity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;

/**
 * 系统区域实体类，用于表示系统中的区域信息。
 */

@Entity
@Getter
@Setter
@Table(name = "sys_area")
public class SysAreaEntity extends BaseEntity {


    // 区域名称
    @Column(name = "area_name", nullable = false, columnDefinition = " varchar(200) comment  '名称' ")
    private String areaName;

    // 区域父 ID
    @Column(name = "parent_id", nullable = false, columnDefinition = " bigint(20) comment  '父级ID' ")
    private Long parentId;
    // 区域描述
    @Column(name = "description", nullable = false, columnDefinition = " varchar(200) comment  '描述' ")
    private String description;

    // 区域类型
    // 0: 国家
    // 1: 省份
    // 2: 城市
    // 3: 区县
    @Column(name = "area_type", nullable = false, columnDefinition = " int(11) comment  '区域类型' ")
    private Integer areaType;

    // 区域编码
    @Column(name = "area_code", nullable = false, columnDefinition = " varchar(200) comment  '区域编码' ")
    private String areaCode;

    // 区域排序
    @Column(name = "order_num", nullable = false, columnDefinition = " int(5) comment '排序' ")
    private Integer orderNum;

    // 区域状态
    @Column(name = "status", nullable = false, columnDefinition = " int(11) comment  '状态' ")
    private Integer status;

    // 区域层级
    @Column(name = "level", nullable = false, columnDefinition = " int(11) comment  '层级' ")
    private Integer level;


}